import string

input_file = "input.txt"
output_file = "output.txt"
exclude = set(string.punctuation + string.ascii_letters)

with open(input_file, "r",encoding='utf-8') as f:
    text = f.read()

words = set()
for char in text:
    if char not in exclude and char != "\n":
        words.add(char)

with open(output_file, "w",encoding='utf-8') as f:
    for word in words:
        f.write(word)


print("success,output file is out.txt")


